<template>
    <div id="garment">
        <Header></Header>
        <PageDescription :urlAndWords="this.urlAndWords"></PageDescription>
        <div class="outside banxin" >
            <span v-for="(item,index) in datas" :key="index"  @click="ToDetails(item.scenarios)">{{item.scenarios}}</span>
        </div>
        <SolutionList :SolutionListdatas=this.solutionListdatas></SolutionList>
        <Footer></Footer>
    </div>
</template>

<script>
    import Header from "@/components/content/header/Header";
    import PageDescription from "@/components/content/pageDescription/PageDescription";
    import Footer from "@/components/content/footer/Footer";
    import SolutionList from "@/components/content/SolutionList/SolutionList";
    import {getAction,postAction} from "@/network/manage";
    export default {
        name: "garment",
        components:{
            Header,
            PageDescription,
            Footer,
            SolutionList
        },
        data(){
            return{
                urlAndWords: {
                    url:require("@/assets/image/excellentScheme/garment.jpg"),
                    c_word:'服装行业优秀方案',
                    e_word:'Excellent program of garment industry',
                },
                datas: [],
                solutionListdatas:[],
            }
        },
        methods:{
            ToDetails(scenarios){
                var formdata=new FormData();
                formdata.append("area ",'家电');
                formdata.append("scene ",scenarios);
                getAction('/solution/getareascenesolutionlist',formdata).then((res)=>{
                    this.solutionListdatas.push(...res.data);
                    console.log(res);

                })
                // this.$router.push({name:'list',query: {imgurl:require("@/assets/image/excellentScheme/garment.jpg"),c_title:'服装行业优秀方案',e_title:'Excellent program of garment industry',area:'服装',scenarios:scenarios}})
            }
        },
        created() {
            postAction('/solution/getscenarioslist').then((res)=>{
                this.datas.push(...res.data);
                console.log(this.datas);

            })

        }
    }
</script>

<style scoped>
    .outside{
        width: 70%;
        height: auto;
        font-size: 16px;
        display: flex;
        flex-wrap: wrap;
    }
    .outside span{
        width: 200px;
        margin:50px 10px;
    }

</style>

